#ifndef __KRNLRELOAD_KRNLRELOAD_INLINEHOOK_HPP__
#define __KRNLRELOAD_KRNLRELOAD_INLINEHOOK_HPP__

#include "new.h"
#include "inline_hook_holder.hpp"

namespace core
{
	class CoreHook : public InlineHookHolder
	{
	public:
		static InlineHookHolder* InlineHook(PVOID pHookAddress, InlineHookCallback pCallback)
		{
			if (NULL == pHookAddress || NULL == pCallback)
				return NULL;

			InlineHookHolder* holder = new(NonPagedPool) InlineHookHolder;
			if (NULL == holder)
				return NULL;

			if (holder->InstallHook(pHookAddress, pCallback))
			{
				return holder;
			}
			else
			{
				delete holder;
				return NULL;
			}
		}
	};
}// namespace core
#endif//__KRNLRELOAD_KRNLRELOAD_INLINEHOOK_HPP__